int32_t sc_init(void)
{


}

void sc_exit(void)
{

}

int32_t sc_select_card(uint8_t solt)
{

}

// atr buf最少开32字节
int32_t sc_power_up(uint8_t* atr)
{


}

void sc_power_off(void)
{


}

bool sc_is_present(void)
{

    return true;
}

// > 0 正常返回， <= 0 错误
int32_t sc_apdu_transceive(uint8_t *inapdu, uint32_t inlen, uint8_t *outapdu)
{
    int32_t ret = -1;
    __disable_interrupt();
    if (ctrl->t1)
        ret = sc_transceive_t1(inapdu, inlen, outapdu);
    else
        ret = sc_transceive_t0(inapdu, inlen, outapdu);
    __enable_interrupt();
    if (ret < 0) {
        sc_power_off();
    }
    return ret;
}